package com.serviceprovider.business.module.admin.faq.model;

public class Category {
    private int    id;
    private String name;
    private String nameFull;

    @Override
    public boolean equals(Object obj) {
        if ((obj == null) ||!(obj instanceof Category)) {
            return false;
        }

        Category b  = (Category) obj;
        boolean  eq = (id == b.id);

        if (!eq) {
            return false;
        }

        eq = ((name == null) && (b.name == null)) || ((name != null) && name.equals(b.name));

        if (!eq) {
            return false;
        }

        eq = ((nameFull == null) && (b.nameFull == null)) || ((nameFull != null) && nameFull.equals(b.nameFull));

        if (!eq) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int prime  = 31;
        int result = 1;

        result = prime * result + id;
        result = prime * result + ((name == null)
                                   ? 0
                                   : name.hashCode());
        result = prime * result + ((nameFull == null)
                                   ? 0
                                   : nameFull.hashCode());

        return result;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNameFull() {
        return nameFull;
    }

    public void setNameFull(String nameFull) {
        this.nameFull = nameFull;
    }
}



